<template>
  <div class="recommend">
    <div class="cards">
      <div
        v-for="(item, index) in datas"
        :key="index"
        :style="{ backgroundColor: item.color }"
        class="card"
      >
        <div>
          <div class="title van-ellipsis">{{ item.title }}</div>
          <div class="desc van-ellipsis">{{ item.desc }}</div>
        </div>
        <img :src="item.img" alt="" />
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "recommend",
  props: {
    datas: Array,
  },
};
</script>

<style scoped>
.recommend {
  position: absolute;
  /* bottom: 1.4rem; */
  top: 68%;
  left: 0.5rem;
  width: 9.5rem;
  height: 4.5rem;
  box-sizing: border-box;
}
.cards {
  width: 100%;
  display: flex;
  flex-direction: row;
}
.card {
  /* background-color: #fff; */
  width: 2.9rem;
  height: 16vh;
  margin-right: 0.15rem;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  justify-content: space-between;
  padding-left: 0.3rem;
  padding-right: 0.3rem;
  padding-top: 0.2rem;
}
.card img {
  width: 2.3rem;
  height: 2rem;
}
.title {
  font-size: 16px;
  font-family: "PHT_L";
  font-weight: 600;
}
.desc {
  font-size: 12px;
  color: #a1a1a1;
}
</style>